<template>
  <!-- 仓库管理 -->
  <div class="search-table-container">
    <el-card class="header">
      <div class="header-btn-list">
        <slot name="header"> </slot>
      </div>
    </el-card>
    <el-card class="body">
      <slot name="default"></slot>
      <div style="display: inline-block; margin-top: 10px">
        <slot name="footer-left"></slot>
      </div>
      <!-- 分页 -->
      <el-pagination v-if="showPagination" v-bind="$attrs" v-on="$listeners">
      </el-pagination>
    </el-card>
  </div>
</template>

<script>
export default {
  name: "SearchTable",
  props: {
    showPagination: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {};
  },
};
</script>

<style lang="scss" scoped>
.search-table-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  .header {
    height: 70px;
    margin-bottom: 10px;
    .header-btn-list {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      .el-button {
        margin-left: 10px;
      }
    }
  }
}
.el-pagination {
  margin-top: 10px;
  float: right;
}
</style>
